<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8"> 
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> 
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="assets/css/admin.css">
   <link rel="stylesheet" href="../theme/css/common.css">
  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/amazeui.min.js"></script>
  <script src="assets/js/app.js"></script>

</head>
<body>

<?php require_once("header.php");?>
<?php require_once("slider.php");?>

  <!-- content start -->
  <div class="admin-content content">
    

 
    <div class="am-g">

      <div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">
       
      
      </div>

      <div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4">
        <form class="am-form am-form-horizontal">


          <div class="am-form-group">
            <label for="user-weibo" class="am-u-sm-3 am-form-label">标题</label>
            <div class="am-u-sm-9">
              <input type="text" id="user-weibo" placeholder="输入你的标题">
            </div>
          </div>

          <div class="am-form-group">
            <label for="user-intro" class="am-u-sm-3 am-form-label">内容</label>
            <div class="am-u-sm-9">
              <textarea class="" rows="5" id="user-intro" placeholder="内容"></textarea>
              <small>250字以内</small>
            </div>
          </div>

          <div class="am-form-group">
            <div class="am-u-sm-9 am-u-sm-push-3">
              <button type="button" class="am-btn am-btn-primary" onClick="app.editsub()">保存修改</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- content end -->

</div>

<a class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
 

<?php 
  require_once("footer.php");
?>

<script>
app={
  url:"../core/src/about.php",
	load:function(){
		$.post(this.url,{"func":"about"},function(d,e){ 
			var data=d.data; 
			$("#user-weibo").val(data.weibo);
			$("#user-intro").val(data.intro);
		});
	},
	
	editsub:function(){
		var form={
			"weibo":$("#user-weibo").val(),
			"intro":$("#user-intro").val(),
		};
		$.post(this.url,{"func":"editsub","form":form},function(){
			 location.reload(true);
		});
	}
	
};
$(function(){
	 app.load();
});
</script>
</body>
</html>
